<h1>
    Dunnage Material
</h1>

<div class='wrap-content'>
    <a href="<?php echo $this->baseUrl() ?>/admin/index/newdunnagematerial">+ New Material</a>
</div>

<form method="POST" action="<?php echo $this->baseUrl() ?>/admin/index/material?type=dunnage">
    <input type="hidden" name="delete" value="1" />
    <input type='submit' value='Delete' class='delete-item-button' />
    <table id="tbl_list" cellspacing="0">
        <thead>
        <tr>
            <th>
                <input id="master_check" type='checkbox'/>
            </th>
            <th>
                Type
            </th>
            <th>
                Unit
            </th>
            <th>
                Price per Unit
            </th>
            <th>
            </th>
        </tr>
        </thead>
        <tbody>
        <?php foreach ($this->paginator as $material): ?>
            <tr>
                <td>
                    <input type='checkbox' name='delete_ids[]' value='<?php echo $material->id ?>'/>
                </td>
                <td>
                    <?php $edit_url = $this->url(array("action" => "editdunnagematerial" , "uid" => $material->id)) ?>
                    <a href='<?php echo $edit_url ?>'>
                        <?php echo $material->type ?>
                    </a>
                </td>
                <td>
                    <?php echo $material->unit ?>
                </td>
                <td>
                    <?php echo $material->price_per_unit ?>
                </td>
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>
</form>
